package com.yf.mediaserver.zlm.bean.hook;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * aliveSecond : 4
 * app : rtp
 * bytesSpeed : 87769
 * createStamp : 1704442264
 * hook_index : 1356
 * isRecordingHLS : true
 * isRecordingMP4 : false
 * mediaServerId : FQ3TF8yT83wh5Wvz
 * originSock : {"identifier":"34020000001320000001_34020000001320000001","local_ip":"::","local_port":35037,"peer_ip":"192.168.31.68","peer_port":15060}
 * origIntegerype : 3
 * origIntegerypeStr : rtp_push
 * originUrl : rtp://__defaultVhost__/rtp/34020000001320000001_34020000001320000001
 * readerCount : 0
 * regist : true
 * schema : hls
 * stream : 34020000001320000001_34020000001320000001
 * totalReaderCount : 0
 * tracks : [{"channels":1,"codec_id":3,"codec_id_name":"PCMA","codec_type":1,"duration":4241,"frames":108,"loss":0,"ready":true,"sample_bit":16,"sample_rate":8000},{"codec_id":0,"codec_id_name":"H264","codec_type":0,"duration":4040,"fps":15,"frames":63,"gop_Integererval_ms":3996,"gop_size":60,"height":1080,"key_frames":3,"loss":0,"ready":true,"width":1920}]
 * vhost : __defaultVhost__
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class OnStreamChangedHookParam extends BaseHookParam implements Serializable {

    private static final long serialVersionUID = 6018492928241367765L;

    /**
     * 应用名
     */
    private String app;

    /**
     * 数据产生速度，单位byte/s
     */
    private Integer bytesSpeed;
    private Integer hook_index;
    private Boolean isRecordingHLS;
    private Boolean isRecordingMP4;
    /**
     * 客户端和服务器网络信息，可能为null类型
     */
    private OriginSockBean originSock;
    /**
     * 服务器id
     */
    private String severId;
    /**
     * GMT unix系统时间戳，单位秒
     */
    private Long createStamp;
    /**
     * 产生源类型的字符串描述
     */
    private String originTypeStr;
    /**
     * 产生源的url
     */
    private String originUrl;

    /**
     * 存活时间，单位秒
     */
    private Long aliveSecond;
    private Integer readerCount;
    /**
     * 产生源类型，
     * unknown = 0,
     * rtmp_push=1,
     * rtsp_push=2,
     * rtp_push=3,
     * pull=4,
     * ffmpeg_pull=5,
     * mp4_vod=6,
     * device_chn=7
     */
    private int originType;
    /**
     * 推流鉴权Id
     */
    private String callId;
    /**
     * 注册/注销
     */
    private Boolean regist;

    /**
     * 协议 包括hls/rtsp/rtmp/http-flv/ws-flv
     */
    private String schema;
    /**
     * 流id
     */
    private String stream;
    /**
     * 观看总人数，包括hls/rtsp/rtmp/http-flv/ws-flv
     */
    private Integer totalReaderCount;
    /**
     * 音视频轨道
     */
    private String vhost;

    /**
     * 音视频轨道
     */
    private List<TracksBean> tracks;


}
